package com.azier.kapacitor.script.method;

import com.azier.kapacitor.script.arg.OriginalArg;

import java.util.ArrayList;

/**
* 1 * @Author: luoj
* 2 * @Date: 2019/11/8 11:27
* 3
*/
public class Truncate extends AbstractMethod {
    private static final String name = "truncate";
    /**
    Optional duration for truncating timestamps. Helpful to ensure data points land on specific boundaries Example: stream
    **/
    /**
    截断时间戳的可选持续时间。有助于确保数据点落在特定边界上示例：流
    **/
    public Truncate(long interval, String durationLiteral) {
        super(new ArrayList<>(), name);
        //
        this.args.add(new OriginalArg(interval + durationLiteral));

    }
}
